<?php

function my_test(){


	if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') 
	{
		//$result = "{'test':'hello world'}";
		$result = '{"test":"hello world"}';
		//$result = json_encode($result);
		echo $result;
   }
   else 
   {
		echo "where in";
      //header("Location: ".$_SERVER["HTTP_REFERER"]);
   }
   
   die();
}

?>